﻿Ext.onReady(function () {
    Ext.apply(Kwan, {
        def: Room
    });
});
Ext.apply(Kwan, {
    roomIcons: { 0: 'icon-bulletcross', 1: 'icon-stopgreen', 2: 'icon-stopred' },
    roomTips: { 0: '已禁用', 1: '空闲', 2: '已入住' },
    prepareRoom: function (grid, toolbar, rowIndex, record) {
        var item = toolbar.items.items[0],
            key = item.command.replace('Room',''),
            val = record.get(key),
            icon = Kwan.roomIcons[val],
            tips = Kwan.roomTips[val];
        item.setIconClass(icon);
        item.setTooltip(tips);
    }
});